import { getAvailableSpace } from "@/service/user/index";
import { message } from "antd";

export const availableAtion = async () => {
  const res = await getAvailableSpace();
  if (res.status !== 200) return message.error(res.msg);
  localStorage.setItem("availableSpace", res.data?.available);
  return {
    type: "refreshAvailableSpace"
  }
};
